using OrderSystem;
using PureMVC.Interfaces;
using PureMVC.Patterns;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Job1TipeMediator : Mediator
{
    private Job1ActivityProxy activityProxy = null;
    Job1TipeView job1TipeView;
    public new const string NAME = "Job1TipeMediator";
    public Job1TipeMediator(Job1TipeView view) : base(NAME, view)
    {
        job1TipeView = view;

    }

    public override void OnRegister()
    {
        base.OnRegister();
    }
    public override IList<string> ListNotificationInterests()
    {
        IList<string> notifications = new List<string>();
        // 
        notifications.Add(EventSystemName.OpTwoTips); // 
        notifications.Add(EventSystemName.ResfrshBag); // 
        return notifications;
    }
    public override void HandleNotification(INotification notification)
    {
        switch (notification.Name)
        {
            case EventSystemName.OpTwoTips:
                Debug.Log("打开");
                TipeData tipeData = notification.Body as TipeData;
                job1TipeView.OpTwoTips(tipeData);
                break;
            case EventSystemName.ResfrshBag:
                Debug.Log("刷新");
                List<Data> Data = notification.Body as List<Data>;
                job1TipeView.OpTips(Data);
                break;
        }
    }
}
